home *** CD-ROM | disk | FTP | other *** search
- Path: news.wwa.com!rmartin
- From: rmartin@oma.com (Robert C. Martin)
- Newsgroups: comp.lang.c++,comp.object
- Subject: Re: Style question: OOD & initialisation
- Date: 14 Mar 1996 18:08:44 GMT
- Organization: Object Mentor
- Distribution: world
- Message-ID: <RMARTIN.96Mar14120844@rcm.oma.com>
- References: <MARTING.96Mar13154718@igly.jtec.com.au>
- NNTP-Posting-Host: rcm.oma.com
- In-reply-to: marting@jtec.com.au's message of 13 Mar 1996 07:47:18 GMT
-
- In article <MARTING.96Mar13154718@igly.jtec.com.au> marting@jtec.com.au (Martin Gregory) writes:
-
- main()
- {
- Controller TheController;
- }
-
-
- However, is this concept of a constructor that doesn't exit till the
- end of time a bit of a worry? (I think it is at least valid.)
-
- Would this type of thing be preferrable:
-
- main()
- {
- Controller TheController;
-
- TheController.Go();
- }
-
- If so, why?
-
-
- Because it allows the following:
-
-
- main()
- {
- Controller c1(1), c2(2);
- if (/* some test */)
- c1.go();
- else
- c2.go();
- };
-
-
-
-
- --
- Robert Martin | Design Consulting | Training courses offered:
- Object Mentor Assoc.| rmartin@oma.com | OOA/D, C++, Advanced OO
- 14619 N. Somerset Cr| Tel: (847) 918-1004 | Mgt. Overview of OOT
- Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com
-
-